import java.util.Stack;

/**
 * @Author ZhangCuirong
 * @Date 2025/9/5 9:44
 * @description:
 */
public class LCR125 {
    public  class CQueue {
        public Stack<Integer> stack = new Stack<>();
        public Stack<Integer> helpStack = new Stack<>();

        public CQueue() {

        }

        public void appendTail(int value) {
            while (!stack.isEmpty()){
                helpStack.push(stack.pop());
            }
            helpStack.push(value);
            while (!helpStack.isEmpty()){
                stack.push(helpStack.pop());
            }
        }

        public int deleteHead() {
            if(stack.isEmpty()){
                return -1;
            }
            return stack.pop();
        }
    }
}
